package sepe.chenli.jiecheng;

import java.util.Scanner;

public class Jiecheng {
    public static  void main(String[] args) {
        int sum = 0;
        System.out.println("输入一个数字: ");
        Scanner in = new Scanner(System.in);
        String str = in.nextLine();
        int n = Integer.valueOf(str);
        for (int i = 1; i <= n; i++)
            sum += i;
        System.out.println("sum=" + sum);
    }
}